Hệ thống quản lý phòng khám trực tuyến bằng PHP

1 <!-- Edit this file to change the layout of the detail view form -->
2
3 <a name=
"detail-view"></a>
4 <div
class="panel-heading"><h3 class="panel-title"><strong><%%DETAIL_VIEW_TITLE%%></strong></h3></div>
5
6 <div
class="panel-body" id="disease_symptoms_dv_container">
7     <!-- child links -->
8     <div
class="row">
9         <div
class="col-xs-12">
10             <div
class="clearfix"></div>
11         </div>
12     </div>
13     <hr>
14
15     <div
class="row">
16         <!-- form inputs -->
17         <div
class="col-md-8 col-lg-10" id="disease_symptoms_dv_form">
18             <fieldset
class="form-horizontal">
19
20                 <div
class="form-group">
21                     <label
for="id" class="control-label col-lg-3">ID</label>
22                     <div
class="col-lg-9">
23                         <div
class="form-control-static" id="id"><%%VALUE(id)%%></div>
24                     </div>
25                 </div>
26
27                 <div
class="form-group">
28                     <label
for="disease" class="control-label col-lg-3">Disease</label>
29                     <div
class="col-lg-9">
30                         <input maxlength=
"200" type="text" class="form-control" name="disease" id="disease" value="<%%VALUE(disease)%%>">
31                     </div>
32                 </div>
33
34                 <div
class="form-group">
35                     <label
for="symptoms" class="control-label col-lg-3">Symptoms</label>
36                     <div
class="col-lg-9">
37                         <textarea
class="form-control" name="symptoms" id="symptoms" rows="5"><%%VALUE(symptoms)%%></textarea>
38                     </div>
39                 </div>
40
41                 <div
class="form-group">
42                     <label
for="reference" class="control-label col-lg-3">Reference</label>
43                     <div
class="col-lg-9">
44                         
45                         <div
class="row">
46                             <div
class="col-md-8">
47                                 <a id=
"reference-link" href="link.php?t=disease_symptoms&f=reference&i=<%%VALUE(id)%%>" target="_blank"><%%VALUE(reference)%%></a>
48                                 <label
for="reference"><button type="button" id="reference-edit-link" class="btn btn-default hspacer-lg vspacer-sm" data-toggle="collapse" data-target="#reference" title="<%%TRANSLATION(Edit)%%>"><i class="glyphicon glyphicon-pencil"></i></button></label>
49                             </div>
50                             <script>jQuery(function(){
var e_reference = '<%%VALUE(reference)%%>'; if(e_reference == '' || e_reference == '&nbsp;' || e_reference == 'blank.gif') jQuery('#reference-link').hide(); });</script><input maxlength="" type="text" class="form-control collapse" name="reference" id="reference" value="<%%VALUE(reference)%%>"> </div>
51
52                     </div>
53                 </div>
54
55             </fieldset>
56         </div>
57
58         <!-- DV action buttons -->
59         <div
class="col-md-4 col-lg-2" id="disease_symptoms_dv_action_buttons">
60             <div
class="btn-toolbar">
61                 <div
class="btn-group-vertical btn-group-lg" style="width: 100%;">
62                     <%%UPDATE_BUTTON%%>
63                 </div><p></p>
64                 <div
class="btn-group-vertical btn-group-lg" style="width: 100%;">
65                     <%%DESELECT_BUTTON%%>
66                     <%%DVPRINT_BUTTON%%>
67                     <%%DELETE_BUTTON%%>
68                 </div><p></p>
69                 <div
class="btn-group-vertical btn-group-lg" style="width: 100%;">
70                     <%%INSERT_BUTTON%%>
71                 </div>
72             </div>
73         </div>
74     </div>
75
76
77 </div><!-- /div
class="panel-body" -->
78     <script>
79         $j(function() {
80             
var add_new_mode = (!$j('input[name=SelectedID]').val());
81             
var embedded_mode = ($j('input[name=Embedded]').val() == 1);
82
83             
/* auto-close embedded page? */
84             
var autoclose_mode = ($j('input[name=AutoClose]').val() == 1);
85             
var record_added_ok = (location.search.split('record-added-ok=').length == 2);
86             
var record_updated_ok = (location.search.split('record-updated-ok=').length == 2);
87             
if((record_added_ok || record_updated_ok) && embedded_mode && autoclose_mode){
88                 setTimeout(function(){
89                     window.parent.jQuery(
'.modal').modal('hide');
90                 },
2000);
91             }
92
93             $j(
'select, input[type=text], textarea').not(':disabled').eq(0).focus();
94             $j(
'form').eq(0).change(function(){
95                 
if($j(this).data('already_changed')) return;
96                 
if($j('#deselect').length) $j('#deselect').removeClass('btn-default').addClass('btn-warning').get(0).lastChild.data = " <%%TRANSLATION(Cancel)%%>";
97                 $j(
this).data('already_changed', true);
98             });
99
100             $j(
'a[href="<%%TRANSLATION(ImageFolder)%%>"]').click(function(){ return false; });
101
102
103             
if(!embedded_mode){
104                 
/* add a horizontal spacer to [add new parent] buttons that don't have a spacered element before them */
105                 $j(
'.add_new_parent').prev(':not(.hspacer-md)').next().addClass('hspacer-md');
106
107                 $j(
'.add_new_parent').click(function(){
108                     
var pt = $j(this).attr('id').replace(/_add_new$/, '');
109                     modal_window({
110                         url: pt +
'_view.php?addNew_x=1&Embedded=1',
111                         close: function(){
112                             
var field_id = $j('#' + pt + '_add_new').prevAll('input:hidden').eq(0).attr('id');
113                             $j(
'#' + field_id + '-container').select2('focus').select2('focus');
114                         },
115                         size:
'full',
116                         title: $j(
this).attr('title')
117                     });
118                 });
119             }
120
121             
/* find and hide parent links if field label has data 'parent_link' set to 'view_parent_hidden' */
122             $j(
'label[data-parent_link=view_parent_hidden]').each(function(){
123                 $j(
this).parents('.form-group').find('.view_parent').hide();
124             });
125
126             $j(
'form').on('click', '.view_parent', function(){
127                 
var pt = $j(this).attr('id').replace(/_view_parent$/, '');
128                 
if($j(this).prevAll('input:hidden').length){
129                     
var parent_id = $j(this).prevAll('input:hidden').eq(0).val();
130                 }
else{
131                     
var parent_id = $j(this).prevAll().children('input:hidden').eq(0).val();
132                 }
133
134                 
/* handle radio lookups */
135                 
if($j(this).prevAll('[type=radio]').length){
136                     parent_id = $j(
this).prevAll('[type=radio]').eq(0).val();
137                 }
138
139                 
if(parent_id != '{empty_value}'){
140                     
var parent_link = $j(this).parents('.form-group').children('label').data('parent_link');
141                     
switch(parent_link){
142                         
case 'view_parent_hidden':
143                             
break;
144                         
case 'view_parent_modal':
145                             modal_window({
146                                 url: pt +
'_view.php?Embedded=1&SelectedID=' + encodeURIComponent(parent_id),
147                                 close: function(){
148                                     
var field_id = $j('#' + pt + '_view_parent').prevAll('input:hidden').eq(0).attr('id');
149                                     $j(
'#' + field_id + '-container').select2('focus').select2('focus');
150                                 },
151                                 size:
'full',
152                                 title: $j(
this).attr('title')
153                             });
154                             
break;
155                         
case 'view_parent_same_window':
156                             window.location = pt +
'_view.php?Embedded=' + (embedded_mode ? '1' : '') + '&SelectedID=' + encodeURIComponent(parent_id);
157                             
break;
158                         
case 'view_parent_new_window':
159                             window.open(pt +
'_view.php?SelectedID=' + encodeURIComponent(parent_id));
160                             
break;
161                     }
162
163                 }
164             });
165
166
167             
/* load admin tools for admin user */
168             
if(!add_new_mode){
169                 $j(
'body').append('<div id="admin-tools-appendix"></div>');
170                 $j(
'#admin-tools-appendix').load(
171                     
'ajax_admin_tools.php?table=disease_symptoms&id=<%%URLVALUE(id)%%>',
172                     function(resp){
173                         
if(!resp.length) return;
174                         $j.ajax(
'ajax_admin_tools.php?action=get_admin_tools_js&table=disease_symptoms&id=<%%URLVALUE(id)%%>');
175                     }
176                 );
177             }
178
179             
/* warn user if 'add new' clicked while unsaved changes exist */
180             $j(
'#addNew').click(function(){
181                 
if($j('#deselect.btn-warning').length){
182                     
return confirm('<%%TRANSLATION(discard changes confirm)%%>');
183                 }
184             });
185
186         });
187     </script>


Gõ tìm kiếm nhanh...